<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateIaserialisTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('iaserialis', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('iaseriali_no', 100);
			$table->string('name', 100);
			$table->string('title', 100)->nullable();
			$table->string('subtitle', 100)->nullable();
			$table->integer('episode');
			$table->decimal('score', 3, 1)->nullable();
			$table->dateTime('firstdate')->nullable();
			$table->dateTime('online_at')->nullable();
			$table->dateTime('offline_at')->nullable();
			$table->integer('iaasset_id')->unsigned()->index('iaasset_id_foreign');
			$table->text('short_desc', 65535)->nullable();
			$table->text('long_desc', 65535)->nullable();
			$table->timestamps();
			$table->softDeletes();
			$table->integer('listorder')->default(0);
			$table->integer('online_status')->nullable()->default(0);
			$table->integer('moderate_status')->nullable()->default(0);
			$table->integer('publish_status')->nullable()->default(0);
			$table->integer('user_id')->unsigned()->default(1);
			$table->boolean('publish_down_status')->default(1);
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('iaserialis');
	}

}
